import request from '@/utils/request'

let wxLiveApi = {

    /*直播列表*/
    getList(data, errorback) {
        return request._postBody('/supplier/live/wx/index', data, errorback);
    },

    /*创建直播*/
    createRoom(data, errorback) {
        return request._postBody('/supplier/live/wx/createRoom', data, errorback);
    },

    /*编辑直播*/
    toEdit(data, errorback) {
        return request._get('/supplier/live/wx/toEdit', data, errorback);
    },

    /*编辑直播*/
    editRoom(data, errorback) {
        return request._postBody('/supplier/live/wx/editRoom', data, errorback);
    },

    /*置顶设置*/
    settop(data, errorback) {
        return request._post('/supplier/live/wx/settop', data, errorback);
    },

    /*删除直播*/
    deleteById(data, errorback) {
        return request._post('/supplier/live/wx/deleteRoom', data, errorback);
    },

    /*小程序商品列表*/
    getProductList(data, errorback) {
        return request._postBody('/supplier/live/wx/product/index', data, errorback);
    },

    /*添加小程序商品*/
    addProduct(data, errorback) {
        return request._postBody('/supplier/live/wx/product/addProduct', data, errorback);
    },

    /*编辑小程序商品*/
    editProduct(data, errorback) {
        return request._postBody('/supplier/live/wx/product/editProduct', data, errorback);
    },

    /*删除直播*/
    deleteProduct(data, errorback) {
        return request._post('/supplier/live/wx/product/deleteProduct', data, errorback);
    },

    /*删除直播*/
    url(data, errorback) {
        return request._post('/supplier/live/wx/url', data, errorback);
    },

    /*小程序商品列表*/
    toImport(data, errorback) {
        return request._postBody('/supplier/live/wx/product/toImport', data, errorback);
    },

    importProducts(data, errorback) {
        return request._postBody('/supplier/live/wx/product/importProducts', data, errorback);
    },

    uploadFile(data, errorback) {
        return request._post('/supplier/live/wx/uploadFile', data, errorback);
    },

}

export default wxLiveApi;
